package com.uw.gateway.filter;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;


@Slf4j
public class UwGatewayPostFilter implements WebFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
        return chain.filter(exchange).doFinally(signalType -> {
            log.info("===>>> Uw Gateway Post Filter");
            exchange.getAttributes().forEach((k, v) -> log.info("{}:{}", k, v));

        });
    }
}
